package com.mallcloud.mall.product.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mallcloud.mall.app.api.entity.dto.AppProductSearchDTO;
import com.mallcloud.mall.app.api.entity.vo.AppProductSearchShopVO;
import com.mallcloud.mall.app.api.entity.vo.AppProductSearchSpuVO;
import com.mallcloud.mall.app.api.entity.vo.AppShopInfoSearchVO;
import com.mallcloud.mall.product.api.vo.AppSpuVO;
import com.mallcloud.mall.common.data.datascope.MallBaseMapper;
import com.mallcloud.mall.product.api.entity.SpuModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * spu信息
 */
@Mapper
public interface SpuMapper extends MallBaseMapper<SpuModel> {

    Page<AppShopInfoSearchVO> pageSpu(Page page, @Param("query") AppProductSearchDTO dto);

    List<AppProductSearchShopVO> listSpuGroup(@Param("categoryId") Long categoryId, @Param("shopIds") List<Long> shopIds);

    Page<AppProductSearchSpuVO> pageSearchSpu(Page page, @Param("query") AppProductSearchDTO dto);

    AppSpuVO getBySpuId(@Param("spuId") Long spuId);

}
